/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

import expression.*;
import org.junit.*;
import static org.junit.Assert.*;

/**
 *
 * @author David
 */
public class DavidRosenIPTest {
    
    public DavidRosenIPTest() {
    }
	
	@Test
	public void test1()
	{
		assertEquals("5 6 + 7 +", InfixtoPostfixTranslator.eval("5 + 6 + 7"));
	}
	
        @Test
	public void test2()
	{
		assertEquals("(1 2) (1 / - 2) +", InfixtoPostfixTranslator.eval("(1 - 2) / (1 + 2)"));
	}
        
	@Test
	public void test3()
	{
		assertEquals("((5 3) / 25 9))/10 / ( /", InfixtoPostfixTranslator.eval("((5 / 3) / ( 25 / 9))/10"));
	}
	
	@Test
	public void test4()
	{
		assertEquals("1 55 3 ^ 4 * + (66 86) * (5 / - 7) +", InfixtoPostfixTranslator.eval("1 + 55 ^ 3 * 4 - (66 * 86) / (5 + 7)"));
	}
}
